# -*- coding: utf-8 -*-

# python 高级特性
if __name__ == '__main__':
    # 列表推导式
    # [ exp for item in collection if condition ]
    a = [x for x in range(10)]
    print a
    b = [2*x for x in range(10)]
    print b
    c = [ 2*x for x in range(10) if x%2==0 ]
    print c
    str_list = ['Welcome','to','python','analysis','course']
    result = [x.upper() for x in str_list if len(x)>3]
    print result